﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;
using WeChat.PlatForm.Entity;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace WeChat.PlatForm.DataAccess.Configs
{
    public class MemberConfig : IEntityTypeConfiguration<MemberEntity>
    {
        public void Configure(EntityTypeBuilder<MemberEntity> builder)
        {
            //指定数据库中的表
            builder.ToTable("T_MEMBER");

            //查询的时候直接过滤器
            builder.HasQueryFilter(u => u.IS_DEL == false);
        }
    }
}
